package club.haomoon.front.service;

import club.haomoon.core.common.PageResult;
import club.haomoon.front.data.pay.RechargeConfigData;
import club.haomoon.front.data.pay.RechargeRecordData;
import club.haomoon.front.validate.common.PageValidate;
import club.haomoon.front.validate.common.RechargeValidate;


import java.util.Map;

/**
 * -------------------------
 * @Description: 充值余额接口服务类
 * @Author: Wangjianwei
 * @Date: 2025/02/24 14:26  
 * -------------------------
 */
public interface IRechargeService {

    /**
     * 充值配置
     *
     * @author Wangjw
     * @param userId 用户ID
     * @return RechargeConfigData
     */
    RechargeConfigData config(Integer userId);

    /**
     * 充值记录
     *
     * @author Wangjw
     * @param userId 用户ID
     * @param pageValidate 分页参数
     * @return PageResult<RechargeRecordData>
     */
    PageResult<RechargeRecordData> record(Integer userId, PageValidate pageValidate);

    /**
     * 充值下单
     *
     * @param userId 用户ID
     * @param terminal 总端
     * @param rechargeValidate 充值参数
     * @return Map<String, Object>
     */
    Map<String, Object> placeOrder(Integer userId, Integer terminal, RechargeValidate rechargeValidate);

    /**
     * @notes 阿里支付后更新状态
     * @return array
     */
    void updatePayOrderStatusToPaid(String outTradeNo, String tradeNo);
}
